Justin Allgaier looked home and hosed until he crashed out of a nearly three-second lead with less than five laps of a scheduled 200 to go to a flat left-rear tyre.
After the #7 JR Motorsports Chevrolet was cleared from Turn 1, Smith and Joe Gibbs Racing Toyota team-mate Sheldon Creed took the final green flag from the front row, with the former prevailing.
Van Gisbergen had lined up on the outside of Row 5 but was able to profit by running high in the #97 Kaulig Racing Chevrolet in the final two laps around the one-mile tri-oval.
The three-time Supercars champion had made a net gain of five positions relative to where he had qualified the #97 Kaulig Racing Chevrolet, in 23rd position, before he was handed several more due to a 13-car crash in the final stage of the race.
The Allgaier crash gave him another, before he earned four more positions himself.
Cole Custer (#00 Stewart-Haas Racing Ford) had qualified on pole position but it was Smith (#81 Toyota) who took the early lead from the other side of the front row.
Van Gisbergen qualified 23rd and had gained one spot by the time an incident involving team-mate Josh Williams unfolded just behind him on Lap 5 at Turn 2 and brought about the first Caution of the afternoon.
Jeremy Clements (#51 Jeremy Clements Racing Chevrolet) appeared to slide into Williams’ #11 Chevrolet, which, along with the #4 Chevrolet of Dawson Cram (JD Motorsports) bore the brunt of the crash which ensued.
The restart came on Lap 12 and, again, Smith gapped the field while van Gisbergen continued to circulate just outside the top 20.
The former won Stage 1 by 2.151s over Custer while the latter was 21st when the contest was neutralised at the end of Lap 45.
A slow pit stop during the stage break put Smith back to fourth, with Custer leading, Allgaier to his side for the restart, and van Gisbergen 19th.
The race went green again on Lap 55, Custer retaining the lead and Smith reclaiming second after Allgaier made a bad launch, with van Gisbergen slipping back outside the top 20 within a handful of laps.
With 70 laps in the books, Allgaier rounded up Smith for second and JGR team-mate Aric Almirola (#19 Toyota) went under him for third.
Van Gisbergen clawed back a handful of spots and found himself in a battle with Anthony Alfredo (Our Motorsports) for 19th.
They ran side-by-side for several laps, with the Kiwi having to catch a big moment, before he finally cleared the #5 Chevrolet with a move down the inside of Turn 4 on Lap 86.
Stage 2 ended on Lap 90, Custer prevailing with van Gisbergen still 19th.
Custer continued to lead when the field took the green again at the start of Lap 101, with van Gisbergen sitting 16th.
In a typically messy Phoenix restart, ‘SVG’ had a nervous moment when he touched Brennan Poole (#44 Alpha Prime Racing Chevrolet) in the pack but they both got away with it.
Smith passed Custer for the lead on Lap 109, then Allgaier went under Car #00 for second place a lap later, and Riley Herbst (#98 SHR Ford) also put a move on his team-mate on Lap 111.
Smith led by more than two seconds, with van Gisbergen 18th, when a Caution was called on Lap 136 in response to Hailie Deegan (#15 AM Racing Ford) scraping the wall at Turn 1.
All of the front-runners took the opportunity to pit and John Hunter Nemechek (#20 JGR Toyota) pinched the lead, from Allgaier, Herbst, and Smith, with van Gisbergen a net unchanged 18th.
The slow pit stop for Smith would prove a crucial setback for JGR when he was caught up in a multi-car crash upon the Lap 144 restart.
Allgaier had moved clear of the field when the restart from the Deegan Caution came on Lap 144, but Herbst, Smith, and Nemechek went three wide.
Smith made contact with the left-rear corner of the #20 Supra which caused team-mate Nemechek to get loose and slow, leaving #81 with no option but to make more contact.
That caused Nemechek to spin down into Herbst, with a total of 13 cars caught up in the carnage on the back straight.
Allgaier, Custer, and Smith were the top three under that Caution which resulted, and was ultimately upgraded to a red flag.
Van Gisbergen having inherited 11th given he had time to back off and drive around the mess while team-mate AJ Allmendinger sat on the lead lap in 19th after earlier engine problems for the #16 Chevrolet, a week on from a failure for the #97 Chevrolet.
The field resumed behind the Pace Car after about 10 minutes and the race went green again with 49 laps to go.
Allgaier saw off some attention from Smith to lead by a full second on Lap 165, as van Gisbergen ran 12th after another battle with Alfredo and also Brandon Jones (#9 JRM Chevrolet).
Allgaier looked home when disaster struck inside the final five laps, setting up a green-white-chequered finish with JGR drivers Smith and Creed (#18 Toyota) on the front row and van Gisbergen 10th.
Smith chose the bottom side while van Gisbergen was sent to the outside of the fifth row by Clements.
The contest went green again on Lap 204 and stayed that way, with Smith gapping Creed, who would lose second place to Jesse Love (#2 Richard Childress Racing Chevrolet) in the end, with the top five rounded out by Austin Hill (#21 RCR Chevrolet) and Custer.
Despite everyone being on well-worn tyres, staying high was no problem for van Gisbergen.
Behind him at the chequered flag was Jones in seventh, from Parker Kligerman, Sammy Smith, and Alfredo, with Allmendinger classified a lap down in 18th.
The Xfinity Series now has a week off before the first road course event of the season, at the Circuit of The Americas, on March 22-23 (local time).